package cn.ac.iscas.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

@Configuration
@PropertySource("classpath:config/flink.properties")
public class FlinkConfig {
    @Value("${flink.jobmanager.address}")
    private String flinkJobmanagerAddr;

    @Value("${flink.jobmanager.ssh.port}")
    private int flinkJobmanagerSshPort;

    @Value("${flink.jobmanager.ssh.user}")
    private String flinkJobmanagerSshUser;

    @Value("${flink.jobmanager.ssh.password}")
    private String flinkJobmanagerSshPassword;

    @Value("${flink.jobmanager.home}")
    private String flinkJobmanagerHome;

    @Value("${flink.jobmanager.port}")
    private String flinkJobmanagerPort;

    @Value("${flink.historymanager.port}")
    private String flinkHistorymanagerPort;

    @Value("${flink.upload.url}")
    private String flinkUploadJarUrl;

    @Value("${flink.run.parallelism}")
    private Integer flinkRunParallelism;

    @Value("${flink.job.log.capacity}")
    private Integer flinkJobLogCapacity;

    @Value("${flink.run.allowNonRestoredState}")
    private String allowNonRestoredState;

    @Value("${flink.run.savePointPath}")
    private String savePointPath;

    @Value("${flink.jar.localPath}")
    private String jarLocalPath;

    @Value("${flink.train.jar.localPath}")
    private String trainJarLocalPath;

    @Value("${flink.jar.entryClass}")
    private String jarEntryClass;

    @Value("${flink.train.model.hdfsPath}")
    private String trainModelHdfsPath;

    @Value("${flink.output.tag}")
    private String outputInfoTag;

    @Value("${flink.output.spliter}")
    private String outputInfoSpliter;

    @Value("${flink.output.eval}")
    private String outputInfoEval;

    @Value("${flink.output.log}")
    private String outputInfoLog;

    @Value("${flink.exec.jar.remote.path}")
    private String flinkExecJarRemotePath;

    public String getTrainModelHdfsPath() {
        return trainModelHdfsPath;
    }

    public void setTrainModelHdfsPath(String trainModelHdfsPath) {
        this.trainModelHdfsPath = trainModelHdfsPath;
    }

    public String getTrainJarLocalPath() {
        return trainJarLocalPath;
    }

    public void setTrainJarLocalPath(String trainJarLocalPath) {
        this.trainJarLocalPath = trainJarLocalPath;
    }

    public String getFlinkJobmanagerAddr() {
        return flinkJobmanagerAddr;
    }

    public void setFlinkJobmanagerAddr(String flinkJobmanagerAddr) {
        this.flinkJobmanagerAddr = flinkJobmanagerAddr;
    }

    public String getFlinkJobmanagerPort() {
        return flinkJobmanagerPort;
    }

    public void setFlinkJobmanagerPort(String flinkJobmanagerPort) {
        this.flinkJobmanagerPort = flinkJobmanagerPort;
    }

    public String getFlinkUploadJarUrl() {
        return flinkUploadJarUrl;
    }

    public void setFlinkUploadJarUrl(String flinkUploadJarUrl) {
        this.flinkUploadJarUrl = flinkUploadJarUrl;
    }

    public Integer getFlinkRunParallelism() {
        return flinkRunParallelism;
    }

    public void setFlinkRunParallelism(Integer flinkRunParallelism) {
        this.flinkRunParallelism = flinkRunParallelism;
    }

    public String getAllowNonRestoredState() {
        return allowNonRestoredState;
    }

    public void setAllowNonRestoredState(String allowNonRestoredState) {
        this.allowNonRestoredState = allowNonRestoredState;
    }

    public String getSavePointPath() {
        return savePointPath;
    }

    public void setSavePointPath(String savePointPath) {
        this.savePointPath = savePointPath;
    }

    public String getJarLocalPath() {
        return jarLocalPath;
    }

    public void setJarLocalPath(String jarLocalPath) {
        this.jarLocalPath = jarLocalPath;
    }

    public String getJarEntryClass() {
        return jarEntryClass;
    }

    public void setJarEntryClass(String jarEntryClass) {
        this.jarEntryClass = jarEntryClass;
    }

    public int getFlinkJobmanagerSshPort() {
        return flinkJobmanagerSshPort;
    }

    public void setFlinkJobmanagerSshPort(int flinkJobmanagerSshPort) {
        this.flinkJobmanagerSshPort = flinkJobmanagerSshPort;
    }

    public String getFlinkJobmanagerSshUser() {
        return flinkJobmanagerSshUser;
    }

    public void setFlinkJobmanagerSshUser(String flinkJobmanagerSshUser) {
        this.flinkJobmanagerSshUser = flinkJobmanagerSshUser;
    }

    public String getFlinkJobmanagerSshPassword() {
        return flinkJobmanagerSshPassword;
    }

    public void setFlinkJobmanagerSshPassword(String flinkJobmanagerSshPassword) {
        this.flinkJobmanagerSshPassword = flinkJobmanagerSshPassword;
    }

    public String getFlinkJobmanagerHome() {
        return flinkJobmanagerHome;
    }

    public void setFlinkJobmanagerHome(String flinkJobmanagerHome) {
        this.flinkJobmanagerHome = flinkJobmanagerHome;
    }

    public String getFlinkHistorymanagerPort() {
        return flinkHistorymanagerPort;
    }

    public void setFlinkHistorymanagerPort(String flinkHistorymanagerPort) {
        this.flinkHistorymanagerPort = flinkHistorymanagerPort;
    }

    public Integer getFlinkJobLogCapacity() {
        return flinkJobLogCapacity;
    }

    public void setFlinkJobLogCapacity(Integer flinkJobLogCapacity) {
        this.flinkJobLogCapacity = flinkJobLogCapacity;
    }

    public String getOutputInfoTag() {
        return outputInfoTag;
    }

    public void setOutputInfoTag(String outputInfoTag) {
        this.outputInfoTag = outputInfoTag;
    }

    public String getOutputInfoSpliter() {
        return outputInfoSpliter;
    }

    public void setOutputInfoSpliter(String outputInfoSpliter) {
        this.outputInfoSpliter = outputInfoSpliter;
    }

    public String getOutputInfoEval() {
        return outputInfoEval;
    }

    public void setOutputInfoEval(String outputInfoEval) {
        this.outputInfoEval = outputInfoEval;
    }

    public String getOutputInfoLog() {
        return outputInfoLog;
    }

    public void setOutputInfoLog(String outputInfoLog) {
        this.outputInfoLog = outputInfoLog;
    }

    public String getFlinkExecJarRemotePath() {
        return flinkExecJarRemotePath;
    }

    public void setFlinkExecJarRemotePath(String flinkExecJarRemotePath) {
        this.flinkExecJarRemotePath = flinkExecJarRemotePath;
    }
}
